<!DOCTYPE>
<html >
<head>
    <meta charset="utf-8">
    <title>购物车</title>
    <link rel="stylesheet" href="__PUBLIC__/Home/css2.css">
    <script src="__PUBLIC__/Home/js/jquery.min.js"></script>
    <script src="__PUBLIC__/Common/Layer/layer.js"></script>
</head>

<body>
<!-- 栏目 -->
<div class="vice-bj">
    <div class="vice">
    	<span class="left">
			<if condition="empty($_SESSION['user_id'])">
			<a href="{:U('Public/login')}" class="green">亲，请登录</a>
			<a href="{:U('Public/reg')}">&#12288会员注册</a>
			<else/>
		欢迎您，{$_SESSION['mobile']}&nbsp;&nbsp;&nbsp;<a href="{:U('User/logout')}" class="green">退出登陆</a>
			</if>
        </span>
        <strong class="right vice1">
        <a href="{:U('User/my_order_lst')}">我的掌中游</a>
        <a href="{:U('Mobile/Index/index')}" class="Phone" style="padding-left:18px;">手机掌中游</a>
        </strong>
    </div>
</div>
<!-- 头 -->
<div class="head">
    <a href="{:U('Index/index')}"><img src="__PUBLIC__/Home/img/index/logo.png" width="198" height="94"></a>
    <div class="search">
	
		<form action="{:U('Index/search')}" method="post">
			<input name="title" type="text" class="left" style="width:240px;">
			<input type="submit" name="button" id="button" value="搜索" class="button edit_search" >
		</form>
	
	</div>
</div>
<!-- 内容 -->
<div class="Complete">
    <h3 style="margin-bottom:10px;"><span>全部商品 {$count} 件</span></h3>
    <ul>
        <li class="Complete2" style="text-align:left">
            <input  type="checkbox" id="selectAll" style=" margin-right:10px;"/><laber for="selectAll">全选</laber>
        </li>
        <li class="Complete1" style="text-align:left">商品</li>
        <li class=" Complete2">单价（元）</li>
        <li class="Complete3">数量</li>
        <li class="Complete4">小计（元）</li>
        <li class="Complete5" style="float:right;">操作</li>
    </ul>
</div>
<form action="{:U('Cart/before_order')}" method="post" onsubmit="return check()">
<div class="Order-form">
    <ul>
        <foreach name="result" item="vo" key="k">
        <li style="width:1040px;padding-top:0; font-size:16px; margin-top:10px;">供应商 : {$vo.shoper_name}</li>
        <li id="li{$vo.id}"  <if condition="($count-1)==$k">style="border-bottom:0"</if> class="cart_list">
            <!--------获得隐主键id---------->

            <input name="goods_id[{$vo.goods_id}]" id="goods_select{$vo.id}" type="checkbox" class="left goods_select" onclick="goods_alone({$vo.id})" value="{$vo.goods_id}" />
			<input type="hidden" name='form' value="{$Think.session.form}"/>
            <span class="Complete1" style="width:480px;">
            <img src="{$vo.pic_url}" style="width:80px; height:80px; float:left; margin:0 10px;" />
            <a target="_blank" href="{:U('Goods/goods_details')}?id={$vo.goods_id}">
                <p style="width:260px; float:left;">{$vo.goods_title}
                    <p style="margin-top:30px;">
                    套餐：{$vo.taocan_name} ID: {$vo.goods_id}
                    </p>
                </p>
            </a>
            </span>
           
            <input type="hidden" name="type" value="0"/>
            <span class="Complete3">
                <p class="Cash-back">￥{$vo['price_new']}，送：{$vo.fanli_jifen} 积分</p>
            </span>
			<span class="Pressurized Complete3 prarent_nub ">
				<a href="javascript:void(0);" class="drop_goods_num" goods_price="{$vo['price_new']}" aggId="{$vo.id}">-</a>
				<input name="goods_num[{$vo.goods_id}]" id="goods_num{$vo.id}" class="goods_num inputCSS" type="text" value="{$vo.goods_num}">
				<a href="javascript:void(0);" class="add_goods_num" goods_price="{$vo['price_new']}" aggId="{$vo.id}">+</a>
			</span>
                        
			<span id="count{$vo.id}" class="Complete4 jisuan">{$vo['price_new'] * $vo['goods_num']}</span>

            <span class="Complete5" style="float:right;">
            	<p><a href="javascript:void (0);" onclick="del_good({$vo.id})">删除</a></p>
                <p id="shoucang_{$vo.goods_id}"><a href="javascript:;" onclick="shoucang({$vo.goods_id})">收藏该商品</a></p>
            </span>
        </li>
        </foreach>
    </ul>
</div>

<div class="div_jiesuan">

    <button class="go jiesuan" >去结算</button>
    <span class=" right gray ">
    <p>已选择<b class="red bold b_nub select">0</b>件商品    总价（不含运费）：<b class="red bold size20 good_money_sum klhjkhkhj">￥0.00</b></p>
    <p>已节省：-￥0.00</p>
    </span>
</div>
</form>

<div class="Options">
    <ul id="tabs">
        <li><a href="javascript:;" id="tab_1" title="tab1">最近浏览</a></li>
        <li><a href="javascript:;" id="tab_2" title="tab2">我的收藏</a></li>
        
    </ul>
    <div id="content">
        <div id="tab1">
            <ul class="guess">
            <foreach name="result_zuji" item="vo_zuji">
                <a style="padding:8px;" href="{:U('Index/goods_details')}?id={$vo_zuji.gid}"><img src="__PUBLIC__/Uploads/goods/{$vo_zuji.goods_pic}" />
                    <p>{$vo_zuji.goods_name|mb_substr=0,15,'utf-8'}...</p>
                    <p class="red">￥{$vo_zuji.goods_price}</p>
                </a>
            </foreach>
            </ul>
        </div>
        <div id="tab2" style="display:none;">
            <ul class="guess">
			<foreach name="result_shoucang" item="vo_shoucang">
                <if condition="$vo_shoucang.is_type == 1">
                    <a style="padding:8px;" href="{:U('Index/goods_details')}?id={$vo_shoucang.goods_id}"><img src="{$vo_shoucang.pic_url}" />
                        <p>{$vo_shoucang.detail_title|mb_substr=0,15,'utf-8'}...</p>
                        <p class="red">￥{$vo_shoucang.price_new}</p>
                    </a>
                </if>
                <if condition="$vo_shoucang.is_type == 2">
                    <a style="padding:8px;" href="{:U('Index/lvyou_details')}?id={$vo_shoucang.goods_id}"><img src={$vo_shoucang.pic_url}" />
                        <p>{$vo_shoucang.detail_title|mb_substr=0,15,'utf-8'}...</p>
                        <p class="red">￥{$vo_shoucang.price_new}</p>
                    </a>
                </if>
			</foreach>
            </ul>
        </div>
        
    </div>
</div>

<!-- 链接 -->

<include file="Public:footer_center" />
<script type="text/javascript">
var shou_cang 	= "{:U('Cart/shoucang_add')}";
var cart_m	  	= "{:U('Cart/cart_mony_del')}";
var cart_del  	= "{:U('Cart/cart_del')}";
var cart_update = "{:U('Cart/update_goods_num')}";
</script>
<script type="text/javascript" src="__PUBLIC__/Home/js/cart/cart.js"></script>
</body>

</html>
